The Control Resource
CHANGED WITH THE APPEARANCE MANAGER
You can use a control ('CNTL'
) resource to define a standard control; many new standard controls have been added with the Appearance Manager. All control resources must have resource ID numbers greater than 127. UseGetNewControl
to create a control defined in a control resource. The Control Manager uses the information you specify to create a control structure in memory. Figure 2-1 shows the structure of this resource.Figure 2-1 Structure of a compiled control
('CNTL')
resource
The compiled version of a control resource contains the following elements:
- The rectangle, specified in coordinates local to the window, that encloses the control and thus determines its size and location.
- The initial setting for the control; see "Settings Values for Standard Controls".
- The visibility of the control. If this element contains the value
true
,GetNewControl
draws the control immediately, without using the application's standard updating mechanism for windows. If this element contains the valuefalse
, the application must useShowControl
when it's prepared to display the control.- Fill. Set to 0.
- The maximum setting for the control; see "Settings Values for Standard Controls".
- The minimum setting for the control; see "Settings Values for Standard Controls".
- The control definition ID, which the Control Manager uses to determine the control definition function for this control; see "Control Definition IDs".
- The control's reference value, which is set and used only by the application--except when the application adds the
kControlPopupUseAddResMenuVariant
variation code to thekControlPopupButtonProc
control definition ID.- For controls that need a title, the string for that title; for controls that don't use titles, an empty string.
- Note
- The titles of all Appearance-compliant standard system controls appear in the system font. You should generally use the system font or small system font in your controls; see Mac OS 8 Human Interface Guidelines for more details.
![]()